import React, { Component } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom'

import Login from './pages/login'
import Admin from './pages/admin'
import Paper from './pages/paper'
import Answer from './pages/answer'

import './App.less'

export default class App extends Component {
    render() {
        return (
            <Switch>
                <Route path='/login' component={Login} />
                <Route path='/admin' component={Admin} />
                <Route path='/paper' component={Paper} />
                <Route path='/answer/:paperId/:type/:id' component={Answer} />
                {/* <Route path='/answer' component={Answer} /> */}
                <Redirect to='/login' />
            </Switch>
        )
    }
}